import { button, on, div, p, svg, text, attrs, when, span } from "./src/dom";
import { effect, singal } from "./src/singal";

const count = singal(0);
setInterval(() => {
  count.value++;
  console.log(count.watchers);
}, 1000);
const root = div(() => {
  text(() => count.value);
  if (count.value) {
    div();
  } else {
    span();
  }
});
document.body.appendChild(root);

// div("hello")
// <div>hello</div>
// fdm
